import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty, IsNumber, IsString } from "class-validator";
import { Teacher } from "src/school/teacher/entities/teacher.entity";

export class CreateClassDto {
  @ApiProperty({ title: "班级", required: true })
  @IsNotEmpty({ message: "班级不能为空" })
  @IsString()
  gradeAndClass: `${number}-${number}`;

  @ApiProperty({ title: "文理科", required: true })
  @IsNotEmpty({ message: "文理科不能为空" })
  @IsNumber()
  subject: 0 | 1 | 2;

  @ApiProperty({ title: "班主任", required: true })
  @IsNotEmpty({ message: "班主任不能为空" })
  @IsString()
  classTeacher: string;

  @ApiProperty({ title: "班主任", required: true })
  @IsNotEmpty({ message: "班主任不能为空" })
  @IsNumber()
  classTeacherId: number;

  @ApiProperty({ title: "语文老师", required: true })
  @IsNotEmpty({ message: "语文老师不能为空" })
  @IsNumber()
  chineseTeacherId: number;

  @ApiProperty({ title: "数学老师", required: true })
  @IsNotEmpty({ message: "数学老师不能为空" })
  @IsNumber()
  mathTeacherId: number;

  @ApiProperty({ title: "英语老师", required: true })
  @IsNotEmpty({ message: "英语老师不能为空" })
  @IsNumber()
  englishTeacherId: number;

  @ApiProperty({ title: "政治老师", required: false })
  politicsTeacherId: number;

  @ApiProperty({ title: "历史老师", required: false })
  historyTeacherId: number;

  @ApiProperty({ title: "地理老师", required: false })
  geographyTeacherId: number;

  @ApiProperty({ title: "物理老师", required: false })
  physicsTeacherId: number;

  @ApiProperty({ title: "化学老师", required: false })
  chemistryTeacherId: number;

  @ApiProperty({ title: "生物老师", required: false })
  biologyTeacherId: number;

  @ApiProperty({ title: "体育老师", required: false })
  physicalEducationTeacherId: number;

  @ApiProperty({ title: "音乐老师", required: false })
  musicTeacherId: number;

  @ApiProperty({ title: "计算机老师", required: false })
  computerTeacherId: number;

  teachers: Teacher[];
  createBy: string;
  createById: number;
  updateBy: string;
  updateById: number;
}
